import Vue from 'vue'
import Router from 'vue-router'
import UserList from '@/components/userManage/userList'
import Index from '@/components/Index'
import Login from '@/components/Login.vue'
import ShopList from '@/components/shop/shopList'
import GoodList from '@/components/goods/goodsList'
import OrderList from '@/components/order/order'
import VideoList from '@/components/video/video'
import EChars from '@/components/Echars/echars'

Vue.use(Router)

export default new Router({
  routes: [
      {
        path: '/login',
        name:'Login',
        component: Login
      },
      {
        path: '/index',
        name: 'Index',
        meta: {
          requireAuth: true
        },
        component: Index,
        children:[
          {
              path:'/index/userlist',
              name:'userList',
              component: UserList,
              meta: {
                requireAuth: true
              },
          },
          {
            path:'/index/shoplist',
            name:'shopList',
            component: ShopList,
            meta: {
              requireAuth: true
            },
          },
          {
            path:'/index/goodslist',
            name:'goodList',
            component: GoodList,
            meta: {
              requireAuth: true
            },
          },
          {
            path:'/index/orderlist',
            name:'orderList',
            component: OrderList,
            meta: {
              requireAuth: true
            },
          },
          {
            path:'/index/videolist',
            name:'VideoList',
            component:VideoList,
            meta: {
              requireAuth: true
            },
          },
          {
            path:'/index/echars',
            name:'EChars',
            component:EChars,
            meta: {
              requireAuth: true
            },
          },
  
        ]
      }
  ]
})
